

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>The BLAS Interface &mdash; CVXOPT User&#39;s Guide</title>
  

  
  
  
  

  
  <script type="text/javascript" src="_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
        <script src="_static/jquery.js"></script>
        <script src="_static/underscore.js"></script>
        <script src="_static/doctools.js"></script>
        <script src="_static/language_data.js"></script>
    
    <script type="text/javascript" src="_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="copyright" title="Copyright" href="copyright.html" />
    <link rel="next" title="The LAPACK Interface" href="lapack.html" />
    <link rel="prev" title="Dense and Sparse Matrices" href="matrices.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="index.html" class="icon icon-home"> CVXOPT User's Guide
          

          
          </a>

          
            
            
              <div class="version">
                1.2.5
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="copyright.html">Copyright and License</a></li>
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="matrices.html">Dense and Sparse Matrices</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">The BLAS Interface</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#matrix-classes">Matrix Classes</a></li>
<li class="toctree-l2"><a class="reference internal" href="#level-1-blas">Level 1 BLAS</a></li>
<li class="toctree-l2"><a class="reference internal" href="#level-2-blas">Level 2 BLAS</a></li>
<li class="toctree-l2"><a class="reference internal" href="#level-3-blas">Level 3 BLAS</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="lapack.html">The LAPACK Interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="fftw.html">Discrete Transforms</a></li>
<li class="toctree-l1"><a class="reference internal" href="spsolvers.html">Sparse Linear Equations</a></li>
<li class="toctree-l1"><a class="reference internal" href="coneprog.html">Cone Programming</a></li>
<li class="toctree-l1"><a class="reference internal" href="solvers.html">Nonlinear Convex Optimization</a></li>
<li class="toctree-l1"><a class="reference internal" href="modeling.html">Modeling</a></li>
<li class="toctree-l1"><a class="reference internal" href="c-api.html">C API</a></li>
<li class="toctree-l1"><a class="reference internal" href="printing.html">Matrix Formatting</a></li>
<li class="toctree-l1"><a class="reference external" href="http://cvxopt.org">cvxopt.org</a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">CVXOPT User's Guide</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
      <li>The BLAS Interface</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="the-blas-interface">
<span id="c-blas"></span><h1>The BLAS Interface<a class="headerlink" href="#the-blas-interface" title="Permalink to this headline">¶</a></h1>
<p>The <code class="xref py py-mod docutils literal notranslate"><span class="pre">cvxopt.blas</span></code> module provides an interface to the double-precision
real and complex Basic Linear Algebra Subprograms (BLAS).  The names and
calling sequences of the Python functions in the interface closely match
the corresponding Fortran BLAS routines (described in the references below)
and their functionality is exactly the same.  Many of the operations
performed by the BLAS routines can be implemented in a more straightforward
way by using the matrix arithmetic of the section <a class="reference internal" href="matrices.html#s-arithmetic"><span class="std std-ref">Arithmetic Operations</span></a>,
combined with the slicing and indexing of the section <a class="reference internal" href="matrices.html#s-indexing"><span class="std std-ref">Indexing and Slicing</span></a>.
As an example, <code class="docutils literal notranslate"><span class="pre">C</span> <span class="pre">=</span> <span class="pre">A</span> <span class="pre">*</span> <span class="pre">B</span></code> gives the same result as the BLAS call
<code class="docutils literal notranslate"><span class="pre">gemm(A,</span> <span class="pre">B,</span> <span class="pre">C)</span></code>.  The BLAS interface offers two advantages.  First,
some of the functions it includes are not easily implemented using the
basic matrix arithmetic.  For example, BLAS includes functions that
efficiently exploit symmetry or triangular matrix structure.  Second, there
is a performance difference that can be significant for large matrices.
Although our implementation of the basic matrix arithmetic makes internal
calls to BLAS, it also often requires creating temporary matrices to store
intermediate results.  The BLAS functions on the other hand always operate
directly on their matrix arguments and never require any copying to
temporary matrices.  Thus they can be viewed as generalizations of the
in-place matrix addition and scalar multiplication of the section
<a class="reference internal" href="matrices.html#s-arithmetic"><span class="std std-ref">Arithmetic Operations</span></a> to more complicated operations.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<ul class="simple">
<li><p>C. L. Lawson, R. J. Hanson, D. R. Kincaid, F. T. Krogh,
Basic Linear Algebra Subprograms for Fortran Use,
ACM Transactions on Mathematical Software, 5(3), 309-323, 1975.</p></li>
<li><p>J. J. Dongarra, J. Du Croz, S. Hammarling, R. J. Hanson,
An Extended Set of Fortran Basic Linear Algebra Subprograms,
ACM Transactions on Mathematical Software, 14(1), 1-17, 1988.</p></li>
<li><p>J. J. Dongarra, J. Du Croz, S. Hammarling, I. Duff,
A Set of Level 3 Basic Linear Algebra Subprograms,
ACM Transactions on Mathematical Software, 16(1), 1-17, 1990.</p></li>
</ul>
</div>
<div class="section" id="matrix-classes">
<span id="s-conventions"></span><h2>Matrix Classes<a class="headerlink" href="#matrix-classes" title="Permalink to this headline">¶</a></h2>
<p>The BLAS exploit several types of matrix structure: symmetric, Hermitian,
triangular, and banded.   We represent all these matrix classes by dense
real or complex <a class="reference internal" href="matrices.html#cvxopt.matrix" title="cvxopt.matrix"><code class="xref py py-class docutils literal notranslate"><span class="pre">matrix</span></code></a> objects, with additional
arguments that specify the structure.</p>
<dl>
<dt><strong>Vector</strong></dt><dd><p>A real or complex <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>-vector is represented by a <code class="xref py py-class docutils literal notranslate"><span class="pre">matrix</span></code>
of type <code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code> and length <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>, with the
entries of the vector stored in column-major order.</p>
</dd>
<dt><strong>General matrix</strong></dt><dd><p>A general real or complex <img class="math" src="_images/math/e9bc7da808d33a16a8347f27a519bd067186aa66.png" alt="m"/> by <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/> matrix is represented
by a real or complex <code class="xref py py-class docutils literal notranslate"><span class="pre">matrix</span></code> of size (<img class="math" src="_images/math/e9bc7da808d33a16a8347f27a519bd067186aa66.png" alt="m"/>, <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>).</p>
</dd>
<dt><strong>Symmetric matrix</strong></dt><dd><p>A real or complex symmetric matrix of order <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/> is represented
by a real or complex <code class="xref py py-class docutils literal notranslate"><span class="pre">matrix</span></code> of size (<img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>, <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>),
and a character argument <code class="docutils literal notranslate"><span class="pre">uplo</span></code>  with two possible values:
<code class="xref py py-const docutils literal notranslate"><span class="pre">'L'</span></code> and <code class="xref py py-const docutils literal notranslate"><span class="pre">'U'</span></code>.  If <code class="docutils literal notranslate"><span class="pre">uplo</span></code>  is <code class="xref py py-const docutils literal notranslate"><span class="pre">'L'</span></code>, the lower
triangular part of the symmetric matrix is stored; if <code class="docutils literal notranslate"><span class="pre">uplo</span></code> is
<code class="xref py py-const docutils literal notranslate"><span class="pre">'U'</span></code>, the upper triangular part is stored.  A square
<code class="xref py py-class docutils literal notranslate"><span class="pre">matrix</span></code> <code class="docutils literal notranslate"><span class="pre">X</span></code> of size (<img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>, <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>) can therefore be
used to represent the symmetric matrices</p>
<div class="math">
<p><img src="_images/math/3f12bcd60dcbf296614984241c025a909a803e1e.png" alt="\left[\begin{array}{ccccc}
    X[0,0]   &amp; X[1,0]   &amp; X[2,0]   &amp; \cdots &amp; X[n-1,0] \\
    X[1,0]   &amp; X[1,1]   &amp; X[2,1]   &amp; \cdots &amp; X[n-1,1] \\
    X[2,0]   &amp; X[2,1]   &amp; X[2,2]   &amp; \cdots &amp; X[n-1,2] \\
    \vdots   &amp; \vdots   &amp; \vdots   &amp; \ddots &amp; \vdots \\
    X[n-1,0] &amp; X[n-1,1] &amp; X[n-1,2] &amp; \cdots &amp; X[n-1,n-1]
\end{array}\right] \quad \mbox{(uplo = 'L')},

\left[\begin{array}{ccccc}
    X[0,0]   &amp; X[0,1]   &amp; X[0,2]   &amp; \cdots &amp; X[0,n-1] \\
    X[0,1]   &amp; X[1,1]   &amp; X[1,2]   &amp; \cdots &amp; X[1,n-1] \\
    X[0,2]   &amp; X[1,2]   &amp; X[2,2]   &amp; \cdots &amp; X[2,n-1] \\
    \vdots   &amp; \vdots   &amp; \vdots   &amp; \ddots &amp; \vdots \\
    X[0,n-1] &amp; X[1,n-1] &amp; X[2,n-1] &amp; \cdots &amp; X[n-1,n-1]
\end{array}\right] \quad \mbox{(uplo = U')}."/></p>
</div></dd>
<dt><strong>Complex Hermitian matrix</strong></dt><dd><p>A complex Hermitian matrix of order <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/> is represented by a
<code class="xref py py-class docutils literal notranslate"><span class="pre">matrix</span></code> of type <code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code> and size (<img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>, <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>),
and a character argument <code class="docutils literal notranslate"><span class="pre">uplo</span></code>  with the same meaning as for
symmetric matrices.  A complex <code class="xref py py-class docutils literal notranslate"><span class="pre">matrix</span></code> <code class="docutils literal notranslate"><span class="pre">X</span></code> of size
(<img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>, <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>) can represent the Hermitian  matrices</p>
<div class="math">
<p><img src="_images/math/ab466a647f375d548d3b12c0c1ecb79704cef8d0.png" alt="\left[\begin{array}{ccccc}
    \Re X[0,0]   &amp; \bar X[1,0]   &amp; \bar X[2,0] &amp; \cdots &amp;
        \bar X[n-1,0] \\
    X[1,0]   &amp; \Re X[1,1]   &amp; \bar X[2,1]   &amp; \cdots &amp;
        \bar X[n-1,1] \\
    X[2,0]   &amp; X[2,1]   &amp; \Re X[2,2]   &amp; \cdots &amp; \bar X[n-1,2] \\
        \vdots   &amp; \vdots   &amp; \vdots   &amp; \ddots &amp; \vdots \\
    X[n-1,0] &amp; X[n-1,1] &amp; X[n-1,2] &amp; \cdots &amp; \Re X[n-1,n-1]
\end{array}\right] \quad \mbox{(uplo = 'L')},

\left[\begin{array}{ccccc}
    \Re X[0,0]   &amp; X[0,1]   &amp; X[0,2]   &amp; \cdots &amp; X[0,n-1] \\
    \bar X[0,1]   &amp; \Re X[1,1]   &amp; X[1,2]   &amp; \cdots &amp; X[1,n-1] \\
    \bar X[0,2]   &amp; \bar X[1,2]   &amp; \Re X[2,2]   &amp; \cdots &amp;
        X[2,n-1] \\
    \vdots   &amp; \vdots   &amp; \vdots   &amp; \ddots &amp; \vdots \\
    \bar X[0,n-1] &amp; \bar X[1,n-1] &amp; \bar X[2,n-1] &amp; \cdots &amp;
        \Re X[n-1,n-1]
\end{array}\right] \quad \mbox{(uplo = 'U')}."/></p>
</div></dd>
<dt><strong>Triangular matrix</strong></dt><dd><p>A real or complex triangular matrix of order <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/> is represented
by a real or complex <code class="xref py py-class docutils literal notranslate"><span class="pre">matrix</span></code> of size (<img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>, <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>),
and two character arguments: an argument <code class="docutils literal notranslate"><span class="pre">uplo</span></code>  with possible values
<code class="xref py py-const docutils literal notranslate"><span class="pre">'L'</span></code> and <code class="xref py py-const docutils literal notranslate"><span class="pre">'U'</span></code> to distinguish between lower and upper
triangular matrices, and an argument <code class="docutils literal notranslate"><span class="pre">diag</span></code>  with possible values
<code class="xref py py-const docutils literal notranslate"><span class="pre">'U'</span></code> and <code class="xref py py-const docutils literal notranslate"><span class="pre">'N'</span></code> to distinguish between unit and non-unit
triangular matrices.  A square <code class="xref py py-class docutils literal notranslate"><span class="pre">matrix</span></code> <code class="docutils literal notranslate"><span class="pre">X</span></code> of size
(<img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>, <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>) can represent the triangular matrices</p>
<div class="math">
<p><img src="_images/math/6669c8a566ba908085156b5c4a539af53616f383.png" alt="\left[\begin{array}{ccccc}
    X[0,0]   &amp; 0        &amp; 0        &amp; \cdots &amp; 0 \\
    X[1,0]   &amp; X[1,1]   &amp; 0        &amp; \cdots &amp; 0 \\
    X[2,0]   &amp; X[2,1]   &amp; X[2,2]   &amp; \cdots &amp; 0 \\
    \vdots   &amp; \vdots   &amp; \vdots   &amp; \ddots &amp; \vdots \\
    X[n-1,0] &amp; X[n-1,1] &amp; X[n-1,2] &amp; \cdots &amp; X[n-1,n-1]
\end{array}\right] \quad \mbox{(uplo = 'L', diag = 'N')},

\left[\begin{array}{ccccc}
    1   &amp; 0   &amp; 0   &amp; \cdots &amp; 0 \\
    X[1,0]   &amp; 1   &amp; 0   &amp; \cdots &amp; 0 \\
    X[2,0]   &amp; X[2,1]   &amp; 1   &amp; \cdots &amp; 0 \\
    \vdots   &amp; \vdots   &amp; \vdots   &amp; \ddots &amp; \vdots \\
    X[n-1,0] &amp; X[n-1,1] &amp; X[n-1,2] &amp; \cdots &amp; 1
\end{array}\right] \quad \mbox{(uplo = 'L', diag = 'U')},

\left[\begin{array}{ccccc}
    X[0,0]   &amp; X[0,1]   &amp; X[0,2]   &amp; \cdots &amp; X[0,n-1] \\
    0   &amp; X[1,1]   &amp; X[1,2]   &amp; \cdots &amp; X[1,n-1] \\
    0   &amp; 0   &amp; X[2,2]   &amp; \cdots &amp; X[2,n-1] \\
    \vdots   &amp; \vdots   &amp; \vdots   &amp; \ddots &amp; \vdots \\
    0 &amp; 0 &amp; 0 &amp; \cdots &amp; X[n-1,n-1]
\end{array}\right] \quad \mbox{(uplo = 'U', diag = 'N')},

\left[\begin{array}{ccccc}
    1   &amp; X[0,1]   &amp; X[0,2]   &amp; \cdots &amp; X[0,n-1] \\
    0   &amp; 1   &amp; X[1,2]   &amp; \cdots &amp; X[1,n-1] \\
    0   &amp; 0   &amp; 1   &amp; \cdots &amp; X[2,n-1] \\
    \vdots   &amp; \vdots   &amp; \vdots   &amp; \ddots &amp; \vdots \\
    0 &amp; 0 &amp; 0 &amp; \cdots &amp; 1
\end{array}\right] \quad \mbox{(uplo = 'U', diag = 'U')}."/></p>
</div></dd>
<dt><strong>General band matrix</strong></dt><dd><p>A general real or complex <img class="math" src="_images/math/e9bc7da808d33a16a8347f27a519bd067186aa66.png" alt="m"/> by <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/> band matrix  with
<img class="math" src="_images/math/801e28cfd4de6fd9c1e00f5e71e5ce7b29ad57f7.png" alt="k_l"/> subdiagonals and <img class="math" src="_images/math/166d5d3acaad3170290c97811491b74b32041dad.png" alt="k_u"/> superdiagonals is represented
by a real or complex <code class="xref py py-class docutils literal notranslate"><span class="pre">matrix</span></code> <code class="docutils literal notranslate"><span class="pre">X</span></code> of size
(<img class="math" src="_images/math/a156920bb8825b9428df86c5bfe4e3ce5b51f0f8.png" alt="k_l + k_u + 1"/>, <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>), and the two integers <img class="math" src="_images/math/e9bc7da808d33a16a8347f27a519bd067186aa66.png" alt="m"/> and
<img class="math" src="_images/math/801e28cfd4de6fd9c1e00f5e71e5ce7b29ad57f7.png" alt="k_l"/>.   The diagonals of the band matrix are stored in the rows
of <code class="docutils literal notranslate"><span class="pre">X</span></code>, starting at the top diagonal, and shifted horizontally so that
the entries of column <img class="math" src="_images/math/9630132210b904754c9ab272b61cb527d12263ca.png" alt="k"/> of the band matrix are stored in column
<img class="math" src="_images/math/9630132210b904754c9ab272b61cb527d12263ca.png" alt="k"/> of <code class="docutils literal notranslate"><span class="pre">X</span></code>.  A <code class="xref py py-class docutils literal notranslate"><span class="pre">matrix</span></code> <code class="docutils literal notranslate"><span class="pre">X</span></code> of size
(<img class="math" src="_images/math/a156920bb8825b9428df86c5bfe4e3ce5b51f0f8.png" alt="k_l + k_u + 1"/>, <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>) therefore represents the <img class="math" src="_images/math/e9bc7da808d33a16a8347f27a519bd067186aa66.png" alt="m"/>
by <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/> band matrix</p>
<div class="math">
<p><img src="_images/math/f86c7a0b45da8cc7f4a00c20bf654b3df94ff06a.png" alt="\left[ \begin{array}{ccccccc}
    X[k_u,0]     &amp; X[k_u-1,1]   &amp; X[k_u-2,2]     &amp; \cdots &amp;
        X[0,k_u] &amp; 0               &amp; \cdots \\
    X[k_u+1,0]   &amp; X[k_u,1]     &amp; X[k_u-1,2]     &amp; \cdots &amp;
        X[1,k_u] &amp; X[0,k_u+1]   &amp; \cdots \\
    X[k_u+2,0]   &amp; X[k_u+1,1]     &amp; X[k_u,2]       &amp; \cdots &amp;
        X[2,k_u] &amp; X[1,k_u+1] &amp; \cdots \\
    \vdots      &amp; \vdots         &amp;  \vdots        &amp; \ddots &amp;
        \vdots   &amp; \vdots          &amp; \ddots  \\
    X[k_u+k_l,0] &amp; X[k_u+k_l-1,1] &amp; X[k_u+k_l-2,2] &amp; \cdots &amp;
        &amp;  &amp; \\
    0            &amp; X[k_u+k_l,1]   &amp; X[k_u+k_l-1,2] &amp; \cdots &amp;
        &amp;  &amp; \\
    \vdots       &amp; \vdots         &amp; \vdots         &amp; \ddots &amp;
        &amp;  &amp;
\end{array}\right]."/></p>
</div></dd>
<dt><strong>Symmetric band matrix</strong></dt><dd><p>A real or complex symmetric band matrix of order <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/> with
<img class="math" src="_images/math/9630132210b904754c9ab272b61cb527d12263ca.png" alt="k"/> subdiagonals, is represented by a real or complex matrix <code class="docutils literal notranslate"><span class="pre">X</span></code>
of size (<img class="math" src="_images/math/e00d4db37b602d888e9a5f2bc30bb8ad68d14ce9.png" alt="k+1"/>, <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>), and an argument <code class="docutils literal notranslate"><span class="pre">uplo</span></code> to indicate
whether the subdiagonals (<code class="docutils literal notranslate"><span class="pre">uplo</span></code> is <code class="xref py py-const docutils literal notranslate"><span class="pre">'L'</span></code>) or superdiagonals
(<code class="docutils literal notranslate"><span class="pre">uplo</span></code> is <code class="xref py py-const docutils literal notranslate"><span class="pre">'U'</span></code>) are stored.  The <img class="math" src="_images/math/e00d4db37b602d888e9a5f2bc30bb8ad68d14ce9.png" alt="k+1"/> diagonals are
stored as rows of <code class="docutils literal notranslate"><span class="pre">X</span></code>, starting at the top diagonal (i.e., the main
diagonal if <code class="docutils literal notranslate"><span class="pre">uplo</span></code> is <code class="xref py py-const docutils literal notranslate"><span class="pre">'L'</span></code>,  or the <img class="math" src="_images/math/9630132210b904754c9ab272b61cb527d12263ca.png" alt="k"/>-th superdiagonal
if <code class="docutils literal notranslate"><span class="pre">uplo</span></code> is <code class="xref py py-const docutils literal notranslate"><span class="pre">'U'</span></code>) and shifted horizontally so that the
entries of the <img class="math" src="_images/math/9630132210b904754c9ab272b61cb527d12263ca.png" alt="k"/>-th column of the band matrix are stored in
column <img class="math" src="_images/math/9630132210b904754c9ab272b61cb527d12263ca.png" alt="k"/> of <code class="docutils literal notranslate"><span class="pre">X</span></code>.  A <code class="xref py py-class docutils literal notranslate"><span class="pre">matrix</span></code> <code class="docutils literal notranslate"><span class="pre">X</span></code> of size
(<img class="math" src="_images/math/e00d4db37b602d888e9a5f2bc30bb8ad68d14ce9.png" alt="k+1"/>, <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>) can therefore represent the band matrices</p>
<div class="math">
<p><img src="_images/math/80e21626c375d52667de27ff84715270afb8ca70.png" alt="\left[ \begin{array}{ccccccc}
    X[0,0] &amp; X[1,0]   &amp; X[2,0]   &amp; \cdots &amp; X[k,0]   &amp; 0
        &amp; \cdots \\
    X[1,0] &amp; X[0,1]   &amp; X[1,1]   &amp; \cdots &amp; X[k-1,1] &amp; X[k,1]
        &amp; \cdots \\
    X[2,0] &amp; X[1,1]   &amp; X[0,2]   &amp; \cdots &amp; X[k-2,2] &amp; X[k-1,2]
        &amp; \cdots \\
    \vdots &amp; \vdots   &amp;  \vdots  &amp; \ddots &amp; \vdots   &amp; \vdots
        &amp; \ddots \\
    X[k,0] &amp; X[k-1,1] &amp; X[k-2,2] &amp; \cdots &amp;  &amp;  &amp; \\
    0      &amp; X[k,1]   &amp; X[k-1,2] &amp; \cdots &amp;  &amp;  &amp; \\
    \vdots &amp; \vdots   &amp; \vdots   &amp; \ddots &amp;  &amp;  &amp;
\end{array}\right] \quad \mbox{(uplo = 'L')},

\left[ \begin{array}{ccccccc}
    X[k,0]   &amp; X[k-1,1] &amp; X[k-2,2] &amp; \cdots &amp; X[0,k] &amp; 0
         &amp; \cdots \\
    X[k-1,1] &amp; X[k,1]   &amp; X[k-1,2] &amp; \cdots &amp; X[1,k] &amp; X[0,k+1]
         &amp; \cdots \\
    X[k-2,2] &amp; X[k-1,2] &amp; X[k,2]   &amp; \cdots &amp; X[2,k] &amp; X[1,k+1]
         &amp; \cdots \\
    \vdots   &amp; \vdots   &amp; \vdots   &amp; \ddots &amp; \vdots &amp; \vdots
         &amp; \ddots \\
    X[0,k]   &amp; X[1,k]   &amp; X[2,k]   &amp; \cdots &amp;  &amp;  &amp; \\
    0        &amp; X[0,k+1] &amp; X[1,k+1] &amp; \cdots &amp;  &amp;  &amp; \\
    \vdots   &amp; \vdots   &amp; \vdots   &amp; \ddots &amp;  &amp;  &amp;
\end{array}\right] \quad \mbox{(uplo='U')}."/></p>
</div></dd>
<dt><strong>Hermitian  band matrix</strong></dt><dd><p>A complex Hermitian band matrix of order <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/> with <img class="math" src="_images/math/9630132210b904754c9ab272b61cb527d12263ca.png" alt="k"/>
subdiagonals is represented by a complex matrix of size
(<img class="math" src="_images/math/e00d4db37b602d888e9a5f2bc30bb8ad68d14ce9.png" alt="k+1"/>, <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>) and an argument <code class="docutils literal notranslate"><span class="pre">uplo</span></code>, with the same meaning
as for symmetric band matrices.  A <code class="xref py py-class docutils literal notranslate"><span class="pre">matrix</span></code> <code class="docutils literal notranslate"><span class="pre">X</span></code> of size
(<img class="math" src="_images/math/e00d4db37b602d888e9a5f2bc30bb8ad68d14ce9.png" alt="k+1"/>, <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>) can represent the band matrices</p>
<div class="math">
<p><img src="_images/math/0667e780fc9b2d0fad01d14184553aba1cd6b81b.png" alt="\left[ \begin{array}{ccccccc}
    \Re X[0,0] &amp; \bar X[1,0]   &amp; \bar X[2,0]   &amp; \cdots &amp;
        \bar X[k,0]   &amp; 0        &amp; \cdots \\
    X[1,0] &amp; \Re X[0,1]   &amp; \bar X[1,1]   &amp; \cdots &amp;
        \bar X[k-1,1] &amp; \bar X[k,1]   &amp; \cdots \\
    X[2,0] &amp; X[1,1]   &amp; \Re X[0,2]   &amp; \cdots &amp;
        \bar X[k-2,2] &amp; \bar X[k-1,2] &amp; \cdots \\
    \vdots &amp; \vdots   &amp;  \vdots  &amp; \ddots &amp; \vdots
        &amp; \vdots   &amp; \ddots \\
    X[k,0] &amp; X[k-1,1] &amp; X[k-2,2] &amp; \cdots &amp;  &amp;  &amp; \\
    0      &amp; X[k,1]   &amp; X[k-1,2] &amp; \cdots &amp;  &amp;  &amp; \\
    \vdots &amp; \vdots   &amp; \vdots   &amp; \ddots &amp;  &amp;  &amp;
\end{array}\right] \quad \mbox{(uplo = 'L')},

\left[ \begin{array}{ccccccc}
    \Re X[k,0]   &amp; X[k-1,1] &amp; X[k-2,2] &amp; \cdots &amp; X[0,k] &amp;
        0        &amp; \cdots \\
    \bar X[k-1,1] &amp; \Re X[k,1]   &amp; X[k-1,2] &amp; \cdots &amp;
        X[1,k] &amp; X[0,k+1] &amp; \cdots \\
    \bar X[k-2,2] &amp; \bar X[k-1,2] &amp; \Re X[k,2]   &amp; \cdots &amp;
        X[2,k] &amp; X[1,k+1] &amp; \cdots \\
    \vdots   &amp; \vdots   &amp; \vdots   &amp; \ddots &amp; \vdots &amp;
        \vdots   &amp; \ddots \\
    \bar X[0,k]   &amp; \bar X[1,k]   &amp; \bar X[2,k]   &amp; \cdots &amp;
        &amp;  &amp; \\
    0        &amp; \bar X[0,k+1] &amp; \bar X[1,k+1] &amp; \cdots &amp;  &amp;  &amp; \\
    \vdots   &amp; \vdots   &amp; \vdots   &amp; \ddots &amp;  &amp;  &amp;
\end{array}\right] \quad \mbox{(uplo='U')}."/></p>
</div></dd>
<dt><strong>Triangular band matrix</strong></dt><dd><p>A triangular band matrix of order <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/> with <img class="math" src="_images/math/9630132210b904754c9ab272b61cb527d12263ca.png" alt="k"/> subdiagonals
or superdiagonals is represented by a real complex matrix of size
(<img class="math" src="_images/math/e00d4db37b602d888e9a5f2bc30bb8ad68d14ce9.png" alt="k+1"/>, <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>) and two character arguments <code class="docutils literal notranslate"><span class="pre">uplo</span></code>  and
<code class="docutils literal notranslate"><span class="pre">diag</span></code>, with similar conventions as for symmetric band matrices.
A <code class="xref py py-class docutils literal notranslate"><span class="pre">matrix</span></code> <code class="docutils literal notranslate"><span class="pre">X</span></code> of size (<img class="math" src="_images/math/e00d4db37b602d888e9a5f2bc30bb8ad68d14ce9.png" alt="k+1"/>, <img class="math" src="_images/math/5a939c5280da7202ca4531f175a7780ad5e1f80a.png" alt="n"/>) can represent
the band matrices</p>
<div class="math">
<p><img src="_images/math/f59b4bcd76f97da1f13ba87bc76bf52b442b4381.png" alt="\left[ \begin{array}{cccc}
    X[0,0] &amp; 0        &amp; 0        &amp; \cdots \\
    X[1,0] &amp; X[0,1]   &amp; 0        &amp; \cdots  \\
    X[2,0] &amp; X[1,1]   &amp; X[0,2]   &amp; \cdots \\
    \vdots &amp; \vdots   &amp; \vdots   &amp; \ddots \\
    X[k,0] &amp; X[k-1,1] &amp; X[k-2,2] &amp; \cdots \\
    0      &amp; X[k,1]   &amp; X[k-1,1] &amp; \cdots \\
    \vdots &amp; \vdots   &amp; \vdots   &amp; \ddots
\end{array}\right] \quad \mbox{(uplo = 'L', diag = 'N')},

\left[ \begin{array}{cccc}
    1      &amp; 0        &amp; 0        &amp; \cdots \\
    X[1,0] &amp; 1        &amp; 0        &amp; \cdots  \\
    X[2,0] &amp; X[1,1]   &amp; 1        &amp; \cdots \\
    \vdots &amp; \vdots   &amp; \vdots   &amp; \ddots \\
    X[k,0] &amp; X[k-1,1] &amp; X[k-2,2] &amp; \cdots \\
    0      &amp; X[k,1]   &amp; X[k-1,2] &amp; \cdots \\
    \vdots &amp; \vdots   &amp; \vdots   &amp; \ddots
\end{array}\right] \quad \mbox{(uplo = 'L', diag = 'U')},

\left[ \begin{array}{ccccccc}
    X[k,0] &amp; X[k-1,1] &amp; X[k-2,3] &amp; \cdots &amp; X[0,k]  &amp;
        0        &amp; \cdots\\
    0      &amp; X[k,1]   &amp; X[k-1,2] &amp; \cdots &amp; X[1,k]  &amp;
        X[0,k+1] &amp; \cdots \\
    0      &amp; 0        &amp; X[k,2]   &amp; \cdots &amp; X[2,k]  &amp;
        X[1,k+1] &amp; \cdots \\
    \vdots &amp; \vdots   &amp;  \vdots  &amp; \ddots &amp; \vdots  &amp;
        \vdots   &amp; \ddots
\end{array}\right] \quad \mbox{(uplo = 'U', diag = 'N')},

\left[ \begin{array}{ccccccc}
    1      &amp; X[k-1,1] &amp; X[k-2,3] &amp; \cdots &amp; X[0,k]  &amp;
        0        &amp; \cdots\\
    0      &amp; 1        &amp; X[k-1,2] &amp; \cdots &amp; X[1,k]  &amp;
        X[0,k+1] &amp; \cdots \\
    0      &amp; 0        &amp; 1        &amp; \cdots &amp; X[2,k]  &amp;
        X[1,k+1] &amp; \cdots \\
    \vdots &amp; \vdots   &amp;  \vdots  &amp; \ddots &amp; \vdots  &amp;
        \vdots   &amp; \ddots
\end{array}\right] \quad \mbox{(uplo = 'U', diag = 'U')}."/></p>
</div></dd>
</dl>
<p>When discussing BLAS functions in the following sections we will omit
several less important optional arguments that can be used to select
submatrices for in-place operations.  The complete specification is
documented in the docstrings of the source code, and can be viewed with the
<strong class="program">pydoc</strong> help program.</p>
</div>
<div class="section" id="level-1-blas">
<span id="s-blas-1"></span><h2>Level 1 BLAS<a class="headerlink" href="#level-1-blas" title="Permalink to this headline">¶</a></h2>
<p>The level 1 functions implement vector operations.</p>
<dl class="py function">
<dt id="cvxopt.blas.scal">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">scal</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">alpha</span></em>, <em class="sig-param"><span class="n">x</span></em><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.scal" title="Permalink to this definition">¶</a></dt>
<dd><p>Scales a vector by a constant:</p>
<div class="math">
<p><img src="_images/math/5052552450b786edab8e0415c96dfa848bc40be1.png" alt="x := \alpha x."/></p>
</div><p>If <code class="docutils literal notranslate"><span class="pre">x</span></code> is a real <code class="xref py py-class docutils literal notranslate"><span class="pre">matrix</span></code>, the scalar argument <code class="docutils literal notranslate"><span class="pre">alpha</span></code> must
be a Python integer or float.  If <code class="docutils literal notranslate"><span class="pre">x</span></code> is complex, <code class="docutils literal notranslate"><span class="pre">alpha</span></code> can be an
integer, float, or complex.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.nrm2">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">nrm2</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">x</span></em><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.nrm2" title="Permalink to this definition">¶</a></dt>
<dd><p>Euclidean norm of a vector:  returns</p>
<div class="math">
<p><img src="_images/math/161320f045cc4315c31907ec05fe170909e3c274.png" alt="\|x\|_2."/></p>
</div></dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.asum">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">asum</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">x</span></em><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.asum" title="Permalink to this definition">¶</a></dt>
<dd><p>1-Norm of a vector: returns</p>
<div class="math">
<p><img src="_images/math/42e6ff06c5afcf7438f6b7bd0027c3c738feceb6.png" alt="\|x\|_1 \quad \mbox{($x$ real)}, \qquad
\|\Re x\|_1 + \|\Im x\|_1 \quad \mbox{($x$ complex)}."/></p>
</div></dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.iamax">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">iamax</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">x</span></em><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.iamax" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns</p>
<div class="math">
<p><img src="_images/math/56ac83c03464e42463c625f1f9ef1833a2927d2e.png" alt="\mathop{\rm argmax}_{k=0,\ldots,n-1} |x_k| \quad \mbox{($x$ real)},
\qquad
\mathop{\rm argmax}_{k=0,\ldots,n-1} |\Re x_k| + |\Im x_k| \quad
    \mbox{($x$ complex)}."/></p>
</div><p>If more than one coefficient achieves the maximum, the index of the
first <img class="math" src="_images/math/9630132210b904754c9ab272b61cb527d12263ca.png" alt="k"/> is returned.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.swap">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">swap</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">x</span></em>, <em class="sig-param"><span class="n">y</span></em><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.swap" title="Permalink to this definition">¶</a></dt>
<dd><p>Interchanges two vectors:</p>
<div class="math">
<p><img src="_images/math/146bec31bf294e89657786d59d21f9c4307ed72f.png" alt="x \leftrightarrow y."/></p>
</div><p><code class="docutils literal notranslate"><span class="pre">x</span></code>  and <code class="docutils literal notranslate"><span class="pre">y</span></code> are matrices of the same type (<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or
<code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.copy">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">copy</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">x</span></em>, <em class="sig-param"><span class="n">y</span></em><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.copy" title="Permalink to this definition">¶</a></dt>
<dd><p>Copies a vector to another vector:</p>
<div class="math">
<p><img src="_images/math/ac0d697baa79826d5fa42ee6fb1be506ff2ac3f8.png" alt="y := x."/></p>
</div><p><code class="docutils literal notranslate"><span class="pre">x</span></code> and <code class="docutils literal notranslate"><span class="pre">y</span></code> are matrices of the same type (<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or
<code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.axpy">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">axpy</code><span class="sig-paren">(</span><em class="sig-param">x</em>, <em class="sig-param">y</em><span class="optional">[</span>, <em class="sig-param">alpha = 1.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.axpy" title="Permalink to this definition">¶</a></dt>
<dd><p>Constant times a vector plus a vector:</p>
<div class="math">
<p><img src="_images/math/4f58d165825711e6619115afb28c246c00440fa2.png" alt="y := \alpha x + y."/></p>
</div><p><code class="docutils literal notranslate"><span class="pre">x</span></code> and <code class="docutils literal notranslate"><span class="pre">y</span></code> are matrices of the same type (<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or
<code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).  If <code class="docutils literal notranslate"><span class="pre">x</span></code> is real, the scalar argument <code class="docutils literal notranslate"><span class="pre">alpha</span></code> must be
a Python integer or float.  If <code class="docutils literal notranslate"><span class="pre">x</span></code> is complex, <code class="docutils literal notranslate"><span class="pre">alpha</span></code> can be an
integer, float, or complex.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.dot">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">dot</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">x</span></em>, <em class="sig-param"><span class="n">y</span></em><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.dot" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns</p>
<div class="math">
<p><img src="_images/math/bd466edf158386c56b457fb6aeb74b97766afdc6.png" alt="x^Hy."/></p>
</div><p><code class="docutils literal notranslate"><span class="pre">x</span></code> and <code class="docutils literal notranslate"><span class="pre">y</span></code> are matrices of the same type (<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or
<code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.dotu">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">dotu</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">x</span></em>, <em class="sig-param"><span class="n">y</span></em><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.dotu" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns</p>
<div class="math">
<p><img src="_images/math/1e913e459d7bcb538986828dad39d548fa73228f.png" alt="x^Ty."/></p>
</div><p><code class="docutils literal notranslate"><span class="pre">x</span></code> and <code class="docutils literal notranslate"><span class="pre">y</span></code> are matrices of the same type (<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or
<code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).</p>
</dd></dl>

</div>
<div class="section" id="level-2-blas">
<span id="s-blas-2"></span><h2>Level 2 BLAS<a class="headerlink" href="#level-2-blas" title="Permalink to this headline">¶</a></h2>
<p>The level 2 functions implement matrix-vector products and rank-1 and
rank-2 matrix updates.  Different types of matrix structure can be exploited
using the conventions of the section <a class="reference internal" href="#s-conventions"><span class="std std-ref">Matrix Classes</span></a>.</p>
<dl class="py function">
<dt id="cvxopt.blas.gemv">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">gemv</code><span class="sig-paren">(</span><em class="sig-param">A</em>, <em class="sig-param">x</em>, <em class="sig-param">y</em><span class="optional">[</span>, <em class="sig-param">trans = 'N'</em>, <em class="sig-param">alpha = 1.0</em>, <em class="sig-param">beta = 0.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.gemv" title="Permalink to this definition">¶</a></dt>
<dd><p>Matrix-vector product with a general matrix:</p>
<div class="math">
<p><img src="_images/math/a810215e77878dec996b87e0d3007d8a6ded6b3c.png" alt="y &amp; := \alpha Ax + \beta y \quad
    (\mathrm{trans} = \mathrm{'N'}), \\
y &amp; := \alpha A^T x + \beta y \quad
    (\mathrm{trans} = \mathrm{'T'}),  \\
y &amp; := \alpha A^H x + \beta y \quad
    (\mathrm{trans} = \mathrm{'C'})."/></p>
</div><p>The arguments <code class="docutils literal notranslate"><span class="pre">A</span></code>, <code class="docutils literal notranslate"><span class="pre">x</span></code>, and <code class="docutils literal notranslate"><span class="pre">y</span></code> must have the same type
(<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).  Complex values of <code class="docutils literal notranslate"><span class="pre">alpha</span></code> and
<code class="docutils literal notranslate"><span class="pre">beta</span></code> are only allowed if <code class="docutils literal notranslate"><span class="pre">A</span></code> is complex.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.symv">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">symv</code><span class="sig-paren">(</span><em class="sig-param">A</em>, <em class="sig-param">x</em>, <em class="sig-param">y</em><span class="optional">[</span>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">alpha = 1.0</em>, <em class="sig-param">beta = 0.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.symv" title="Permalink to this definition">¶</a></dt>
<dd><p>Matrix-vector  product with a real symmetric matrix:</p>
<div class="math">
<p><img src="_images/math/3f7c5e248ea93d509e428921ea91f68e03f1b029.png" alt="y := \alpha A x + \beta y,"/></p>
</div><p>where <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> is a real symmetric matrix.  The arguments <code class="docutils literal notranslate"><span class="pre">A</span></code>,
<code class="docutils literal notranslate"><span class="pre">x</span></code>, and <code class="docutils literal notranslate"><span class="pre">y</span></code> must have type <code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code>, and <code class="docutils literal notranslate"><span class="pre">alpha</span></code> and
<code class="docutils literal notranslate"><span class="pre">beta</span></code> must be real.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.hemv">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">hemv</code><span class="sig-paren">(</span><em class="sig-param">A</em>, <em class="sig-param">x</em>, <em class="sig-param">y</em><span class="optional">[</span>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">alpha = 1.0</em>, <em class="sig-param">beta = 0.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.hemv" title="Permalink to this definition">¶</a></dt>
<dd><p>Matrix-vector  product with a real symmetric or complex Hermitian
matrix:</p>
<div class="math">
<p><img src="_images/math/3f7c5e248ea93d509e428921ea91f68e03f1b029.png" alt="y := \alpha A x + \beta y,"/></p>
</div><p>where <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> is real symmetric or complex Hermitian.  The arguments
<code class="docutils literal notranslate"><span class="pre">A</span></code>, <code class="docutils literal notranslate"><span class="pre">x</span></code>, <code class="docutils literal notranslate"><span class="pre">y</span></code> must have the same type (<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or
<code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).  Complex values of <code class="docutils literal notranslate"><span class="pre">alpha</span></code> and <code class="docutils literal notranslate"><span class="pre">beta</span></code> are only
allowed if <code class="docutils literal notranslate"><span class="pre">A</span></code>  is complex.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.trmv">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">trmv</code><span class="sig-paren">(</span><em class="sig-param">A</em>, <em class="sig-param">x</em><span class="optional">[</span>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">trans = 'N'</em>, <em class="sig-param">diag = 'N'</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.trmv" title="Permalink to this definition">¶</a></dt>
<dd><p>Matrix-vector  product with a triangular matrix:</p>
<div class="math">
<p><img src="_images/math/0e95b3c9bb477c1d27aa253d83fe2d3e1922b3ef.png" alt="x &amp; := Ax \quad (\mathrm{trans} = \mathrm{'N'}), \\
x &amp; := A^T x \quad (\mathrm{trans} = \mathrm{'T'}), \\
x &amp; := A^H x \quad (\mathrm{trans} = \mathrm{'C'}),"/></p>
</div><p>where <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> is square and triangular.  The arguments <code class="docutils literal notranslate"><span class="pre">A</span></code> and
<code class="docutils literal notranslate"><span class="pre">x</span></code> must have the same type (<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.trsv">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">trsv</code><span class="sig-paren">(</span><em class="sig-param">A</em>, <em class="sig-param">x</em><span class="optional">[</span>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">trans = 'N'</em>, <em class="sig-param">diag = 'N'</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.trsv" title="Permalink to this definition">¶</a></dt>
<dd><p>Solution of a nonsingular triangular set of linear equations:</p>
<div class="math">
<p><img src="_images/math/11969d386f3f62d281586721cb47b9bc640ea082.png" alt="x &amp; := A^{-1}x \quad (\mathrm{trans} = \mathrm{'N'}), \\
x &amp; := A^{-T}x \quad (\mathrm{trans} = \mathrm{'T'}), \\
x &amp; := A^{-H}x \quad (\mathrm{trans} = \mathrm{'C'}),"/></p>
</div><p>where <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> is square and triangular with nonzero diagonal elements.
The arguments <code class="docutils literal notranslate"><span class="pre">A</span></code>  and <code class="docutils literal notranslate"><span class="pre">x</span></code> must have the same type (<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or
<code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.gbmv">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">gbmv</code><span class="sig-paren">(</span><em class="sig-param">A</em>, <em class="sig-param">m</em>, <em class="sig-param">kl</em>, <em class="sig-param">x</em>, <em class="sig-param">y</em><span class="optional">[</span>, <em class="sig-param">trans = 'N'</em>, <em class="sig-param">alpha = 1.0</em>, <em class="sig-param">beta = 0.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.gbmv" title="Permalink to this definition">¶</a></dt>
<dd><p>Matrix-vector product with a general band matrix:</p>
<div class="math">
<p><img src="_images/math/eb873a106ad1868e288ae26783dd930d360fdef5.png" alt="y &amp; := \alpha Ax + \beta y \quad
    (\mathrm{trans} = \mathrm{'N'}), \\
y &amp; := \alpha A^T x + \beta y \quad
    (\mathrm{trans} = \mathrm{'T'}),  \\
y &amp; := \alpha A^H x + \beta y \quad
    (\mathrm{trans} = \mathrm{'C'}),"/></p>
</div><p>where  <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> is a rectangular band matrix with <img class="math" src="_images/math/e9bc7da808d33a16a8347f27a519bd067186aa66.png" alt="m"/> rows and
<img class="math" src="_images/math/801e28cfd4de6fd9c1e00f5e71e5ce7b29ad57f7.png" alt="k_l"/> subdiagonals.  The arguments <code class="docutils literal notranslate"><span class="pre">A</span></code>, <code class="docutils literal notranslate"><span class="pre">x</span></code>, <code class="docutils literal notranslate"><span class="pre">y</span></code>  must have
the same type (<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).  Complex values of
<code class="docutils literal notranslate"><span class="pre">alpha</span></code>  and <code class="docutils literal notranslate"><span class="pre">beta</span></code>  are only allowed if <code class="docutils literal notranslate"><span class="pre">A</span></code> is complex.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.sbmv">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">sbmv</code><span class="sig-paren">(</span><em class="sig-param">A</em>, <em class="sig-param">x</em>, <em class="sig-param">y</em><span class="optional">[</span>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">alpha = 1.0</em>, <em class="sig-param">beta = 0.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.sbmv" title="Permalink to this definition">¶</a></dt>
<dd><p>Matrix-vector  product with a real symmetric band matrix:</p>
<div class="math">
<p><img src="_images/math/5dacf40fdb001db01bc47f5b86fcb7ce6dc4a0e2.png" alt="y := \alpha Ax + \beta y,"/></p>
</div><p>where <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/>  is a real symmetric band matrix.  The arguments
<code class="docutils literal notranslate"><span class="pre">A</span></code>, <code class="docutils literal notranslate"><span class="pre">x</span></code>, <code class="docutils literal notranslate"><span class="pre">y</span></code>  must have type <code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code>, and <code class="docutils literal notranslate"><span class="pre">alpha</span></code> and
<code class="docutils literal notranslate"><span class="pre">beta</span></code> must be real.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.hbmv">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">hbmv</code><span class="sig-paren">(</span><em class="sig-param">A</em>, <em class="sig-param">x</em>, <em class="sig-param">y</em><span class="optional">[</span>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">alpha = 1.0</em>, <em class="sig-param">beta = 0.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.hbmv" title="Permalink to this definition">¶</a></dt>
<dd><p>Matrix-vector  product with a real symmetric or complex Hermitian band
matrix:</p>
<div class="math">
<p><img src="_images/math/5dacf40fdb001db01bc47f5b86fcb7ce6dc4a0e2.png" alt="y := \alpha Ax + \beta y,"/></p>
</div><p>where <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> is a real symmetric or complex Hermitian band matrix.
The arguments <code class="docutils literal notranslate"><span class="pre">A</span></code>, <code class="docutils literal notranslate"><span class="pre">x</span></code>,  <code class="docutils literal notranslate"><span class="pre">y</span></code>  must have the same type
(<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).  Complex values of <code class="docutils literal notranslate"><span class="pre">alpha</span></code> and
<code class="docutils literal notranslate"><span class="pre">beta</span></code>  are only allowed if <code class="docutils literal notranslate"><span class="pre">A</span></code>  is complex.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.tbmv">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">tbmv</code><span class="sig-paren">(</span><em class="sig-param">A</em>, <em class="sig-param">x</em><span class="optional">[</span>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">trans = 'N'</em>, <em class="sig-param">diag = 'N'</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.tbmv" title="Permalink to this definition">¶</a></dt>
<dd><p>Matrix-vector  product with a triangular band matrix:</p>
<div class="math">
<p><img src="_images/math/81787f23988417db8fee122d8cc6141a1985c4b7.png" alt="x &amp; := Ax \quad (\mathrm{trans} = \mathrm{'N'}), \\
x &amp; := A^T x \quad (\mathrm{trans} = \mathrm{'T'}), \\
x &amp; := A^H x \quad (\mathrm{trans} = \mathrm{'C'})."/></p>
</div><p>The arguments <code class="docutils literal notranslate"><span class="pre">A</span></code> and <code class="docutils literal notranslate"><span class="pre">x</span></code>  must have the same type (<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or
<code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.tbsv">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">tbsv</code><span class="sig-paren">(</span><em class="sig-param">A</em>, <em class="sig-param">x</em><span class="optional">[</span>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">trans = 'N'</em>, <em class="sig-param">diag = 'N'</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.tbsv" title="Permalink to this definition">¶</a></dt>
<dd><p>Solution of a triangular banded set of linear equations:</p>
<div class="math">
<p><img src="_images/math/d5a4cdcdf8e599dc8e0d8a8c1301f02f9e8b4fb3.png" alt="x &amp; := A^{-1}x \quad (\mathrm{trans} = \mathrm{'N'}), \\
x &amp; := A^{-T} x \quad (\mathrm{trans} = \mathrm{'T'}), \\
x &amp; := A^{-H} x \quad (\mathrm{trans} = \mathrm{'T'}),"/></p>
</div><p>where <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> is a triangular band matrix of with nonzero diagonal
elements.  The arguments <code class="docutils literal notranslate"><span class="pre">A</span></code>  and <code class="docutils literal notranslate"><span class="pre">x</span></code>  must have the same type
(<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.ger">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">ger</code><span class="sig-paren">(</span><em class="sig-param">x</em>, <em class="sig-param">y</em>, <em class="sig-param">A</em><span class="optional">[</span>, <em class="sig-param">alpha = 1.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.ger" title="Permalink to this definition">¶</a></dt>
<dd><p>General rank-1 update:</p>
<div class="math">
<p><img src="_images/math/81868e29eaf33185bcc60e1d6ff7b0e307f2f892.png" alt="A := A + \alpha x y^H,"/></p>
</div><p>where <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> is a general matrix.  The arguments <code class="docutils literal notranslate"><span class="pre">A</span></code>, <code class="docutils literal notranslate"><span class="pre">x</span></code>, and
<code class="docutils literal notranslate"><span class="pre">y</span></code>  must have the same type (<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).  Complex
values of <code class="docutils literal notranslate"><span class="pre">alpha</span></code>  are only allowed if <code class="docutils literal notranslate"><span class="pre">A</span></code>  is complex.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.geru">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">geru</code><span class="sig-paren">(</span><em class="sig-param">x</em>, <em class="sig-param">y</em>, <em class="sig-param">A</em><span class="optional">[</span>, <em class="sig-param">alpha = 1.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.geru" title="Permalink to this definition">¶</a></dt>
<dd><p>General rank-1 update:</p>
<div class="math">
<p><img src="_images/math/05c3b434aba8ec5e2ac1cdfcc3e3bb7ca8a69775.png" alt="A := A + \alpha x y^T,"/></p>
</div><p>where <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> is a general matrix.  The arguments <code class="docutils literal notranslate"><span class="pre">A</span></code>, <code class="docutils literal notranslate"><span class="pre">x</span></code>,  and
<code class="docutils literal notranslate"><span class="pre">y</span></code>  must have the same type (<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).  Complex
values of <code class="docutils literal notranslate"><span class="pre">alpha</span></code>  are only allowed if <code class="docutils literal notranslate"><span class="pre">A</span></code>  is complex.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.syr">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">syr</code><span class="sig-paren">(</span><em class="sig-param">x</em>, <em class="sig-param">A</em><span class="optional">[</span>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">alpha = 1.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.syr" title="Permalink to this definition">¶</a></dt>
<dd><p>Symmetric rank-1 update:</p>
<div class="math">
<p><img src="_images/math/8cb2d6eb037326c227a257ebad6eae725bd40148.png" alt="A := A + \alpha xx^T,"/></p>
</div><p>where <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> is a real symmetric matrix.  The arguments <code class="docutils literal notranslate"><span class="pre">A</span></code>  and
<code class="docutils literal notranslate"><span class="pre">x</span></code>  must have type <code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code>.  <code class="docutils literal notranslate"><span class="pre">alpha</span></code>  must be a real number.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.her">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">her</code><span class="sig-paren">(</span><em class="sig-param">x</em>, <em class="sig-param">A</em><span class="optional">[</span>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">alpha = 1.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.her" title="Permalink to this definition">¶</a></dt>
<dd><p>Hermitian rank-1 update:</p>
<div class="math">
<p><img src="_images/math/26e45da42a12ddc160256fb6cbbb944eeba0dee8.png" alt="A := A + \alpha xx^H,"/></p>
</div><p>where <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> is a real symmetric or complex Hermitian matrix.  The
arguments <code class="docutils literal notranslate"><span class="pre">A</span></code>  and <code class="docutils literal notranslate"><span class="pre">x</span></code>  must have the same type (<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or
<code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).  <code class="docutils literal notranslate"><span class="pre">alpha</span></code>  must be a real number.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.syr2">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">syr2</code><span class="sig-paren">(</span><em class="sig-param">x</em>, <em class="sig-param">y</em>, <em class="sig-param">A</em><span class="optional">[</span>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">alpha = 1.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.syr2" title="Permalink to this definition">¶</a></dt>
<dd><p>Symmetric rank-2  update:</p>
<div class="math">
<p><img src="_images/math/73e26546f3f051d6cc494fa37072d2eac9856ac1.png" alt="A := A + \alpha (xy^T + yx^T),"/></p>
</div><p>where <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> is a real symmetric matrix.  The arguments <code class="docutils literal notranslate"><span class="pre">A</span></code>, <code class="docutils literal notranslate"><span class="pre">x</span></code>,
and <code class="docutils literal notranslate"><span class="pre">y</span></code> must have type <code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code>.  <code class="docutils literal notranslate"><span class="pre">alpha</span></code>  must be real.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.her2">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">her2</code><span class="sig-paren">(</span><em class="sig-param">x</em>, <em class="sig-param">y</em>, <em class="sig-param">A</em><span class="optional">[</span>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">alpha = 1.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.her2" title="Permalink to this definition">¶</a></dt>
<dd><p>Symmetric rank-2  update:</p>
<div class="math">
<p><img src="_images/math/d2241f81f782d8593f9390f06af621fd3be21ab8.png" alt="A := A + \alpha xy^H + \bar \alpha yx^H,"/></p>
</div><p>where <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> is a a real symmetric or complex Hermitian matrix.
The arguments <code class="docutils literal notranslate"><span class="pre">A</span></code>, <code class="docutils literal notranslate"><span class="pre">x</span></code>, and <code class="docutils literal notranslate"><span class="pre">y</span></code> must have the same type
(<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).  Complex values of <code class="docutils literal notranslate"><span class="pre">alpha</span></code> are only
allowed if <code class="docutils literal notranslate"><span class="pre">A</span></code> is complex.</p>
</dd></dl>

<p>As an example, the following code multiplies the tridiagonal matrix</p>
<div class="math">
<p><img src="_images/math/072b7c28c9bc48c8509301fcff6dfb5095db4a07.png" alt="A = \left[\begin{array}{rrrr}
      1 &amp;  6 &amp;  0 &amp; 0 \\
      2 &amp; -4 &amp;  3 &amp; 0 \\
      0 &amp; -3 &amp; -1 &amp; 1
\end{array}\right]"/></p>
</div><p>with the vector <img class="math" src="_images/math/a38b44a27c1755531418f8bb853736ab038d7e9e.png" alt="x = (1,-1,2,-2)"/>.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">cvxopt</span> <span class="kn">import</span> <span class="n">matrix</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">cvxopt.blas</span> <span class="kn">import</span> <span class="n">gbmv</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">A</span> <span class="o">=</span> <span class="n">matrix</span><span class="p">([[</span><span class="mf">0.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">],</span>  <span class="p">[</span><span class="mf">6.</span><span class="p">,</span> <span class="o">-</span><span class="mf">4.</span><span class="p">,</span> <span class="o">-</span><span class="mf">3.</span><span class="p">],</span>  <span class="p">[</span><span class="mf">3.</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">],</span>  <span class="p">[</span><span class="mf">1.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">]])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">x</span> <span class="o">=</span> <span class="n">matrix</span><span class="p">([</span><span class="mf">1.</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="o">-</span><span class="mf">2.</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">y</span> <span class="o">=</span> <span class="n">matrix</span><span class="p">(</span><span class="mf">0.</span><span class="p">,</span> <span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">gbmv</span><span class="p">(</span><span class="n">A</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">y</span><span class="p">)</span>
<span class="go">[-5.00e+00]</span>
<span class="go">[ 1.20e+01]</span>
<span class="go">[-1.00e+00]</span>
</pre></div>
</div>
<p>The following example illustrates the use of
<a class="reference internal" href="#cvxopt.blas.tbsv" title="cvxopt.blas.tbsv"><code class="xref py py-func docutils literal notranslate"><span class="pre">tbsv</span></code></a>.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">cvxopt</span> <span class="kn">import</span> <span class="n">matrix</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">cvxopt.blas</span> <span class="kn">import</span> <span class="n">tbsv</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">A</span> <span class="o">=</span> <span class="n">matrix</span><span class="p">([</span><span class="o">-</span><span class="mf">6.</span><span class="p">,</span> <span class="mf">5.</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">],</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">4</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">x</span> <span class="o">=</span> <span class="n">matrix</span><span class="p">(</span><span class="mf">1.0</span><span class="p">,</span> <span class="p">(</span><span class="mi">4</span><span class="p">,</span><span class="mi">1</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">tbsv</span><span class="p">(</span><span class="n">A</span><span class="p">,</span> <span class="n">x</span><span class="p">)</span>  <span class="c1"># x := diag(A)^{-1}*x</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">x</span><span class="p">)</span>
<span class="go">[-1.67e-01]</span>
<span class="go">[ 2.00e-01]</span>
<span class="go">[-1.00e+00]</span>
<span class="go">[ 5.00e-01]</span>
</pre></div>
</div>
</div>
<div class="section" id="level-3-blas">
<span id="s-blas-3"></span><h2>Level 3 BLAS<a class="headerlink" href="#level-3-blas" title="Permalink to this headline">¶</a></h2>
<p>The level 3 BLAS include functions for matrix-matrix multiplication.</p>
<dl class="py function">
<dt id="cvxopt.blas.gemm">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">gemm</code><span class="sig-paren">(</span><em class="sig-param">A</em>, <em class="sig-param">B</em>, <em class="sig-param">C</em><span class="optional">[</span>, <em class="sig-param">transA = 'N'</em>, <em class="sig-param">transB = 'N'</em>, <em class="sig-param">alpha = 1.0</em>, <em class="sig-param">beta = 0.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.gemm" title="Permalink to this definition">¶</a></dt>
<dd><p>Matrix-matrix product of two general matrices:</p>
<div class="math">
<p><img src="_images/math/bc28eed8cb92072618037ffe78d36cdf031045b0.png" alt="\newcommand{\op}{\mathop{\mathrm{op}}}
C := \alpha \op(A) \op(B) + \beta C"/></p>
</div><p>where</p>
<div class="math">
<p><img src="_images/math/8c1dcc7704e1d156a5f896c8c0a3326c2722a3fa.png" alt="\newcommand{\op}{\mathop{\mathrm{op}}}
\op(A) =  \left\{ \begin{array}{ll}
    A &amp; \mathrm{transA} = \mathrm{'N'} \\
    A^T &amp; \mathrm{transA} = \mathrm{'T'} \\
    A^H &amp; \mathrm{transA} = \mathrm{'C'} \end{array} \right.
\qquad
\op(B) =  \left\{ \begin{array}{ll}
    B &amp; \mathrm{transB} = \mathrm{'N'} \\
    B^T &amp; \mathrm{transB} = \mathrm{'T'} \\
    B^H &amp; \mathrm{transB} = \mathrm{'C'}. \end{array} \right."/></p>
</div><p>The arguments <code class="docutils literal notranslate"><span class="pre">A</span></code>, <code class="docutils literal notranslate"><span class="pre">B</span></code>, and <code class="docutils literal notranslate"><span class="pre">C</span></code> must have the same type
(<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).  Complex values of <code class="docutils literal notranslate"><span class="pre">alpha</span></code> and
<code class="docutils literal notranslate"><span class="pre">beta</span></code> are only allowed if <code class="docutils literal notranslate"><span class="pre">A</span></code> is complex.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.symm">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">symm</code><span class="sig-paren">(</span><em class="sig-param">A</em>, <em class="sig-param">B</em>, <em class="sig-param">C</em><span class="optional">[</span>, <em class="sig-param">side = 'L'</em>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">alpha =1.0</em>, <em class="sig-param">beta = 0.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.symm" title="Permalink to this definition">¶</a></dt>
<dd><p>Product of a real or complex symmetric matrix <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> and a general
matrix <img class="math" src="_images/math/4bc3e94a67870b41b7c20179693e889251e2c136.png" alt="B"/>:</p>
<div class="math">
<p><img src="_images/math/c7fb856181b7b0b9f3cf0ca66c11fe63ea2b7278.png" alt="C &amp; := \alpha AB + \beta C \quad (\mathrm{side} = \mathrm{'L'}), \\
C &amp; := \alpha BA + \beta C \quad (\mathrm{side} = \mathrm{'R'})."/></p>
</div><p>The arguments <code class="docutils literal notranslate"><span class="pre">A</span></code>, <code class="docutils literal notranslate"><span class="pre">B</span></code>, and <code class="docutils literal notranslate"><span class="pre">C</span></code>  must have the same type
(<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).  Complex values of <code class="docutils literal notranslate"><span class="pre">alpha</span></code>  and
<code class="docutils literal notranslate"><span class="pre">beta</span></code> are only allowed if <code class="docutils literal notranslate"><span class="pre">A</span></code> is complex.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.hemm">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">hemm</code><span class="sig-paren">(</span><em class="sig-param">A</em>, <em class="sig-param">B</em>, <em class="sig-param">C</em><span class="optional">[</span>, <em class="sig-param">side = 'L'</em>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">alpha = 1.0</em>, <em class="sig-param">beta = 0.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.hemm" title="Permalink to this definition">¶</a></dt>
<dd><p>Product of a real symmetric or complex Hermitian matrix <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> and a
general matrix <img class="math" src="_images/math/4bc3e94a67870b41b7c20179693e889251e2c136.png" alt="B"/>:</p>
<div class="math">
<p><img src="_images/math/c7fb856181b7b0b9f3cf0ca66c11fe63ea2b7278.png" alt="C &amp; := \alpha AB + \beta C \quad (\mathrm{side} = \mathrm{'L'}), \\
C &amp; := \alpha BA + \beta C \quad (\mathrm{side} = \mathrm{'R'})."/></p>
</div><p>The arguments <code class="docutils literal notranslate"><span class="pre">A</span></code>, <code class="docutils literal notranslate"><span class="pre">B</span></code>,  and <code class="docutils literal notranslate"><span class="pre">C</span></code> must have the same type
(<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).  Complex values of <code class="docutils literal notranslate"><span class="pre">alpha</span></code> and
<code class="docutils literal notranslate"><span class="pre">beta</span></code>  are only allowed if <code class="docutils literal notranslate"><span class="pre">A</span></code> is complex.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.trmm">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">trmm</code><span class="sig-paren">(</span><em class="sig-param">A</em>, <em class="sig-param">B</em><span class="optional">[</span>, <em class="sig-param">side = 'L'</em>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">transA = 'N'</em>, <em class="sig-param">diag = 'N'</em>, <em class="sig-param">alpha = 1.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.trmm" title="Permalink to this definition">¶</a></dt>
<dd><p>Product of a triangular matrix <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> and a general matrix <img class="math" src="_images/math/4bc3e94a67870b41b7c20179693e889251e2c136.png" alt="B"/>:</p>
<div class="math">
<p><img src="_images/math/7056acd535c8f98331e8dd89e48cc0e927d42b12.png" alt="\newcommand{\op}{\mathop{\mathrm{op}}}
\begin{split}
B &amp; := \alpha\op(A)B \quad (\mathrm{side} = \mathrm{'L'}), \\
B &amp; := \alpha B\op(A) \quad (\mathrm{side} = \mathrm{'R'})
\end{split}"/></p>
</div><p>where</p>
<div class="math">
<p><img src="_images/math/4f7be1be65d6087c8016b324e3d3e258e12f405d.png" alt="\newcommand{\op}{\mathop{\mathrm{op}}}
\op(A) =  \left\{ \begin{array}{ll}
     A &amp; \mathrm{transA} = \mathrm{'N'} \\
     A^T &amp; \mathrm{transA} = \mathrm{'T'} \\
     A^H &amp; \mathrm{transA} = \mathrm{'C'}. \end{array} \right."/></p>
</div><p>The arguments <code class="docutils literal notranslate"><span class="pre">A</span></code> and <code class="docutils literal notranslate"><span class="pre">B</span></code> must have the same type (<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or
<code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).  Complex values of <code class="docutils literal notranslate"><span class="pre">alpha</span></code> are only allowed if <code class="docutils literal notranslate"><span class="pre">A</span></code>
is complex.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.trsm">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">trsm</code><span class="sig-paren">(</span><em class="sig-param">A</em>, <em class="sig-param">B</em><span class="optional">[</span>, <em class="sig-param">side = 'L'</em>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">transA = 'N'</em>, <em class="sig-param">diag = 'N'</em>, <em class="sig-param">alpha = 1.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.trsm" title="Permalink to this definition">¶</a></dt>
<dd><p>Solution of a nonsingular triangular system of equations:</p>
<div class="math">
<p><img src="_images/math/c20519763e75b58870bd25238b358057e2da4b86.png" alt="\newcommand{\op}{\mathop{\mathrm{op}}}
\begin{split}
B &amp; := \alpha \op(A)^{-1}B \quad (\mathrm{side} = \mathrm{'L'}), \\
B &amp; := \alpha B\op(A)^{-1} \quad (\mathrm{side} = \mathrm{'R'}),
\end{split}"/></p>
</div><p>where</p>
<div class="math">
<p><img src="_images/math/145a22013f61134f2b61c99bdc4bf56a23e7ba62.png" alt="\newcommand{\op}{\mathop{\mathrm{op}}}
\op(A) =  \left\{ \begin{array}{ll}
    A &amp; \mathrm{transA} = \mathrm{'N'} \\
    A^T &amp; \mathrm{transA} = \mathrm{'T'} \\
    A^H &amp; \mathrm{transA} = \mathrm{'C'}, \end{array} \right."/></p>
</div><p><img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> is triangular and <img class="math" src="_images/math/4bc3e94a67870b41b7c20179693e889251e2c136.png" alt="B"/> is a general matrix.  The
arguments <code class="docutils literal notranslate"><span class="pre">A</span></code> and <code class="docutils literal notranslate"><span class="pre">B</span></code> must have the same type (<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or
<code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).  Complex values of <code class="docutils literal notranslate"><span class="pre">alpha</span></code> are only allowed if <code class="docutils literal notranslate"><span class="pre">A</span></code>
is complex.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.syrk">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">syrk</code><span class="sig-paren">(</span><em class="sig-param">A</em>, <em class="sig-param">C</em><span class="optional">[</span>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">trans = 'N'</em>, <em class="sig-param">alpha = 1.0</em>, <em class="sig-param">beta = 0.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.syrk" title="Permalink to this definition">¶</a></dt>
<dd><p>Rank-<img class="math" src="_images/math/9630132210b904754c9ab272b61cb527d12263ca.png" alt="k"/> update of a real or complex symmetric matrix <img class="math" src="_images/math/4db5b6e16e06f929ce3f675c5e535d06ffb02ff7.png" alt="C"/>:</p>
<div class="math">
<p><img src="_images/math/081eab67b8ad47c824c773f9ce571fe5883895bf.png" alt="C &amp; := \alpha AA^T + \beta C \quad
    (\mathrm{trans} = \mathrm{'N'}),  \\
C &amp; := \alpha A^TA + \beta C \quad
    (\mathrm{trans} = \mathrm{'T'}),"/></p>
</div><p>where <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> is a general matrix.  The arguments <code class="docutils literal notranslate"><span class="pre">A</span></code> and <code class="docutils literal notranslate"><span class="pre">C</span></code>
must have the same type (<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).  Complex values
of <code class="docutils literal notranslate"><span class="pre">alpha</span></code>  and <code class="docutils literal notranslate"><span class="pre">beta</span></code> are only allowed if <code class="docutils literal notranslate"><span class="pre">A</span></code> is complex.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.herk">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">herk</code><span class="sig-paren">(</span><em class="sig-param">A</em>, <em class="sig-param">C</em><span class="optional">[</span>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">trans = 'N'</em>, <em class="sig-param">alpha = 1.0</em>, <em class="sig-param">beta = 0.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.herk" title="Permalink to this definition">¶</a></dt>
<dd><p>Rank-<img class="math" src="_images/math/9630132210b904754c9ab272b61cb527d12263ca.png" alt="k"/> update of a real symmetric or complex Hermitian matrix
<img class="math" src="_images/math/4db5b6e16e06f929ce3f675c5e535d06ffb02ff7.png" alt="C"/>:</p>
<div class="math">
<p><img src="_images/math/783499b0add3c6f6f392a2b8d39402a6aa232020.png" alt="C &amp; := \alpha AA^H + \beta C \quad
    (\mathrm{trans} = \mathrm{'N'}), \\
C &amp; := \alpha A^HA + \beta C \quad
    (\mathrm{trans} = \mathrm{'C'}),"/></p>
</div><p>where <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> is a general matrix.  The arguments <code class="docutils literal notranslate"><span class="pre">A</span></code> and <code class="docutils literal notranslate"><span class="pre">C</span></code>
must have the same type (<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).  <code class="docutils literal notranslate"><span class="pre">alpha</span></code> and
<code class="docutils literal notranslate"><span class="pre">beta</span></code> must be real.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.syr2k">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">syr2k</code><span class="sig-paren">(</span><em class="sig-param">A</em>, <em class="sig-param">B</em>, <em class="sig-param">C</em><span class="optional">[</span>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">trans = 'N'</em>, <em class="sig-param">alpha = 1.0</em>, <em class="sig-param">beta = 0.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.syr2k" title="Permalink to this definition">¶</a></dt>
<dd><p>Rank-<img class="math" src="_images/math/1cfcab44d097a385b6e2fb16cfefc2f062ab999f.png" alt="2k"/> update of a real or complex symmetric matrix <img class="math" src="_images/math/4db5b6e16e06f929ce3f675c5e535d06ffb02ff7.png" alt="C"/>:</p>
<div class="math">
<p><img src="_images/math/0b75ca09d0ef9d47484865bd353fc1e234d0ffae.png" alt="C &amp; := \alpha (AB^T + BA^T) + \beta C \quad
    (\mathrm{trans} = \mathrm{'N'}), \\
C &amp; := \alpha (A^TB + B^TA) + \beta C \quad
    (\mathrm{trans} = \mathrm{'T'})."/></p>
</div><p><img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> and <img class="math" src="_images/math/4bc3e94a67870b41b7c20179693e889251e2c136.png" alt="B"/> are general real or complex matrices.  The
arguments <code class="docutils literal notranslate"><span class="pre">A</span></code>, <code class="docutils literal notranslate"><span class="pre">B</span></code>, and <code class="docutils literal notranslate"><span class="pre">C</span></code> must have the same type.  Complex
values of <code class="docutils literal notranslate"><span class="pre">alpha</span></code>  and <code class="docutils literal notranslate"><span class="pre">beta</span></code> are only allowed if <code class="docutils literal notranslate"><span class="pre">A</span></code> is complex.</p>
</dd></dl>

<dl class="py function">
<dt id="cvxopt.blas.her2k">
<code class="sig-prename descclassname">cvxopt.blas.</code><code class="sig-name descname">her2k</code><span class="sig-paren">(</span><em class="sig-param">A</em>, <em class="sig-param">B</em>, <em class="sig-param">C</em><span class="optional">[</span>, <em class="sig-param">uplo = 'L'</em>, <em class="sig-param">trans = 'N'</em>, <em class="sig-param">alpha = 1.0</em>, <em class="sig-param">beta = 0.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#cvxopt.blas.her2k" title="Permalink to this definition">¶</a></dt>
<dd><p>Rank-<img class="math" src="_images/math/1cfcab44d097a385b6e2fb16cfefc2f062ab999f.png" alt="2k"/> update of a real symmetric or complex Hermitian matrix
<img class="math" src="_images/math/4db5b6e16e06f929ce3f675c5e535d06ffb02ff7.png" alt="C"/>:</p>
<div class="math">
<p><img src="_images/math/a6b6966ce67e827face4426ab49db20ec6a74a9e.png" alt="C &amp; := \alpha AB^H + \bar \alpha BA^H + \beta C \quad
    (\mathrm{trans} = \mathrm{'N'}), \\
C &amp; := \alpha A^HB + \bar\alpha B^HA + \beta C \quad
    (\mathrm{trans} = \mathrm{'C'}),"/></p>
</div><p>where <img class="math" src="_images/math/211284f68205c3e66773eaf026f32a0acdd3dfb3.png" alt="A"/> and <img class="math" src="_images/math/4bc3e94a67870b41b7c20179693e889251e2c136.png" alt="B"/> are general matrices.  The arguments
<code class="docutils literal notranslate"><span class="pre">A</span></code>, <code class="docutils literal notranslate"><span class="pre">B</span></code>, and <code class="docutils literal notranslate"><span class="pre">C</span></code> must have the same type (<code class="xref py py-const docutils literal notranslate"><span class="pre">'d'</span></code> or
<code class="xref py py-const docutils literal notranslate"><span class="pre">'z'</span></code>).   Complex values of <code class="docutils literal notranslate"><span class="pre">alpha</span></code> are only allowed if <code class="docutils literal notranslate"><span class="pre">A</span></code>
is complex.  <code class="docutils literal notranslate"><span class="pre">beta</span></code> must be real.</p>
</dd></dl>

</div>
</div>


           </div>
           
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="lapack.html" class="btn btn-neutral float-right" title="The LAPACK Interface" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="matrices.html" class="btn btn-neutral float-left" title="Dense and Sparse Matrices" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; <a href="copyright.html">Copyright</a> 2004-2020, M.S. Andersen, J. Dahl, L. Vandenberghe
      <span class="lastupdated">
        Last updated on Apr 16, 2020.
      </span>

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
  
    <div class="footer">
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 3.0.1.
    </div>

</body>
</html>